home *** CD-ROM | disk | FTP | other *** search
- property sp, pos, spJump
-
- on new me, asp
- me.sp = asp
- me.pos = the loc of sprite me.sp
- spJump = -2
- InitBall(me)
- return me
- end
-
- on InitBall me
- me.pos = point(250, 120)
- UpdatePos(me, point(0, 0))
- set the blend of sprite the sp of me to random(10) * 5
- end
-
- on MoveBall me
- x = (random(7) - 4) * spJump
- y = (random(7) - 4) * spJump
- UpdatePos(me, point(x, y))
- end
-
- on UpdatePos me, aPos
- tempPos = me.pos + aPos
- me.pos = tempPos
- DrawtoStage(me)
- end
-
- on DrawtoStage me
- set the loc of sprite the sp of me to me.pos
- end
-